{% extends 'base.html' %}
{% block title %}  - Alphabetical search for artists {% endblock %}

{% block content %}
<script type="text/javascript" src="/site_media/js/user.js"></script>
<div id="content" style="position:absolute; top:20px; left:0px; background-color: #1A1A1A; layer-background-color: #1A1A1A; border: 1px none #000000;">
<table width="800">
	<tr>
		<td colspan="2"><p><span style="font-size:14px;color:#CCC">Search in alphabetical order</span></p></td>
	</tr>
	<tr>
		<td>
			<b>{% for x in abc %}
			<a href="/user/search/abc/?key={{x|lower}}">
				 {%ifequal x key.upper %}<b style='color:white'>{{x}}</b>
				 {%else%}
				 {{x}}
				 {%endifequal%}
				  </a>| 
			{% endfor %}</b>
		</td>
		<td align="center">
			<a href="/user/search/abc/">View All</a>
		</td>
    </tr>
    <tr><td>
    	Artist <input name="search" type="radio" value="/user/search/abc/" onclick="window.location=this.value;" checked/> 
	  	Asset <input name="search" type="radio" value="/user/search/abc/asset/" onclick="window.location=this.value;" /> 
    </td></tr>
    <tr>
    	<td colspan="2"><br><br />
			<p>Artist list | 
			{% if artists.has_previous %} 
				<a href="?page={{ artists.previous_page_number }}" title="Previous page"><<<</a> 
			{% endif %}
				Page {{ artists.number }} of {{ artists.paginator.num_pages }}.
			{% if artists.has_next %}
				<a href="?page={{ artists.next_page_number }}" title="Next page">>>></a>
			{% endif %}</p>
		</td>
	</tr>    
</table>

<table id='form table' width="800">
	<tr>
		<th width="75"></th>
		<th width="75">Last name</th>
		<th width="75">First name</th>
		<th width="100">Job title</th>
		<th width="50">Unavailable</th>
		<th width="100">Special skill</th>
		<th width="100">Note</th>
	</tr>
	{% for artist in artists.object_list %}
	<tr>
		<td>
			<a href="javascript:;artist_assets({{artist.id}});"><img src="{{artist.get_profile.photo}}" height="50"></a>
		</td>
		<td><a href="/user/{{artist.id}}/" title="View profile">{{artist.last_name}}</a></td>
		<td><a href="/user/{{artist.id}}/" title="View profile">{{artist.first_name}}</a></td>
		<td><a href="/user/{{artist.id}}/" title="View profile">{{artist.get_profile.role}}</a></td>
		<td>
			{% for temp in ues %}
			{% if temp.user.id == artist.id %}
            {% if temp.start != temp.end %}
			{{temp.start}} ~<br/>{{temp.end}}
			{% endif %}
 			{% endif %}
			{% endfor %}
		</td>
        <td><a href="/user/{{artist.id}}/" title="View profile">{{artist.get_profile.customer_skills}}</a></td>
		<td>
			<form action="/user/note/{{artist.id}}/?url=/user/search/abc/" method="post">
				<input name="note" size="35" maxlength="100" type="text" value="{{artist.get_profile.note}}"/>
			</form>
		</td>
	</tr>
	{% endfor %}
</table>
</div>
<div id="dialog"></div>
{% endblock %}